﻿using SqlSugar;

namespace Entity.Models;

[SugarTable(TableDescription = "用户表")]
public class SysUser
{
    [SugarColumn(IsIdentity = true, IsPrimaryKey = true, ColumnDescription = "主键Id")]
    public int Id { get; set; }

    [SugarColumn(ColumnDescription = "用户名")]
    public string UserName { get; set; } = "";

    [SugarColumn(ColumnDescription = "公司Id")]
    public int? CompanyId { get; set; }

    [SugarColumn(ColumnDescription = "密码")]
    public string Password { get; set; } = "";

    [SugarColumn(ColumnDescription = "状态")]
    public int Status { get; set; }

    [SugarColumn(ColumnDescription = "电话")]
    public string? Phone { get; set; }

    [SugarColumn(ColumnDescription = "地址")]
    public string? Address { get; set; }

    [SugarColumn(ColumnDescription = "邮箱")]
    public string? Email { get; set; }

    [SugarColumn(ColumnDescription = "QQ")]
    public string? QQ { get; set; }

    [SugarColumn(ColumnDescription = "微信")]
    public string? WeChat { get; set; }

    [SugarColumn(ColumnDescription = "性别")]
    public int? Gender { get; set; }

    [SugarColumn(ColumnDescription = "最后登录时间")]
    public DateTime? LastLoginTime { get; set; }

    [SugarColumn(
        ColumnDescription = "创建时间",
        DefaultValue = " CURRENT_TIMESTAMP()",
        IsOnlyIgnoreInsert = true
    )]
    public DateTime? CreateTime { get; set; }

    [SugarColumn(ColumnDescription = "创建人Id")]
    public int? CreateId { get; set; }

    [SugarColumn(ColumnDescription = "最后修改时间")]
    public DateTime? LastModifyTime { get; set; }

    [SugarColumn(ColumnDescription = "最后修改人Id")]
    public int? LastModifyId { get; set; }
}